<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>vocJsJS | Main Function Tests</title>

		
		<script type="text/javascript" src="../lib/jquery-1.7.1.js"></script>
		
		<!-- vocJsJS Framework -->
		<script type="text/javascript" src="../src/voc.core.js"></script>
		<script type="text/javascript" src="../src/voc.string.js"></script>
		<script type="text/javascript" src="../src/voc.number.js"></script>
		<script type="text/javascript" src="../src/voc.object.js"></script>
		
		<script type="text/javascript">
			
			$(function() {
				test.main();
				
			
			
			});
			
			//*** TEST Methoden
			var test = {
				main: function() {
					var quickExpr = /^(?:([#\.])([\w\-]*)$)/;
					var attrExpr = /^(?:\[(.*)([=])(.*)\]$)/;
					var match = attrExpr.exec( "[a=b]" );
					match = (match)? match : [];
					debug(match.join(" - "));
					var obj = vocJs.extend({a:1},{b:2});
					var objs = [{a:1,n:"A"},{_id: "myId", a:2, n:"B"},{a:2, n:"C", _class: "aa bc dd"},{a:2,n:"D", _class: "bc"}];
					vocJs(objs).each(function() {
							debug((this.n));
					});
					debug("<hr>");
					vocJs('[a=1]', objs).each(function() {
							debug((this.n));
					});
						debug("<hr>");
					vocJs('#myId', objs).each(function() {
							debug((this.n));
					});
					debug("<hr>");
					vocJs('.bc', objs).each(function() {
							debug((this.n));
					});
					//vocJs(objs).findMe();
						
					/*var results = vocJs.find( {input: [
						{a:1,n:1},
						{a:1,n:2},
						{a:2,n:3}
						],
						attr: "a",
						value: 1 });
						
						vocJs.each(results, function(i, obj) {
							debug(obj.n);
						}); */
				},
				noop: function() {
				}
			};
			
			function debug(text) {
				$('#debug').append(text);
				$('#debug').append('<br>');
			}
		
		</script>
	</head>
	<body>
	
	<div id="debug">	
	</div>
	
	<div id="error">	
	</div>
	
	</body>
</html>